<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>连接服务端（支持socket）</title>
	<script src="socket.io.min.js"></script>
</head>
<body>
	<button>向服务端发送请求</button>
</body>
<script>
	const ws = io.connect("/");
	const btn = document.querySelector("button");
	ws.on("two",function(a,b,c,d){
		console.log(a,b,c,d)
	})
	btn.onclick = function(){
		ws.emit("one",1,2,3,4);
	}
	
</script>
</html>